package com.cqemme.comm.enums;



import java.util.HashMap;

import java.util.Map;

/**s
 * @author amkj
 */

public enum EnumOrgTypes {

    /**
     * 省教委
     */

    ProvinceEducation( 2,"省教委"),
    /**
     * 市教委
     */
    CityEducation(3,"市教委"),

    /**
     * 县教委
     */
    CountyEducation(4,"(区)县教委"),

    /**
     * 学校
     */
    School(5,"学校");

    private final String name;
    private final int idx;


    EnumOrgTypes(int idx, String name ){
        this.name = name;
        this.idx = idx;
    }


    public String getName() {
        return this.name;
    }

    public int getIdx() {
        return this.idx;
    }



    public static Map<String,String> getMap() {
        Map<String,String> map=new HashMap<String,String>();
        EnumOrgTypes[] p = values();
        for (EnumOrgTypes type : p) {
            map.put(String.valueOf(type.getIdx()), type.getName());
        }
        return map;
    }
    public static Map<Integer,String> getRealMap() {
        Map<Integer,String> map=new HashMap<Integer,String>();
        EnumOrgTypes[] p = values();
        for (EnumOrgTypes type : p) {
            map.put(type.getIdx(), type.getName());
        }
        return map;
    }
}
